import Vue from 'vue'
import VueRouter from 'vue-router'
<<<<<<< HEAD
import MovieView from '../views/MovieView.vue'
import CinemaView from '../views/CinemaView.vue'
import MineView from '../views/MineView.vue'
=======
import MovieView from '../views/movie/index.vue'
>>>>>>> 1d30f8a (initial commit)

Vue.use(VueRouter)

const routes = [
<<<<<<< HEAD
	{
	  path: '/',
	  name: 'movie',
	  component: MovieView
	},
  {
    path: '/movie',
    name: 'movie',
    component: MovieView
=======
  {
    path: '/',
    redirect: 'movie',
  },
  {
    path: '/movie',
    name: 'movie',
	component: MovieView,
	children: [
		{
			path: 'city',
			name: 'city',
			component:  () => import('../components/City.vue')
		},
		{
			path: 'now',
			name: 'now',
			component:  () => import('../components/Now.vue')
		},
		{
			path: 'coming',
			name: 'coming',
			component:  () => import('../components/Coming.vue')
		},
		{
			path: 'search',
			name: 'search',
			component:  () => import('../components/Search.vue')
		},{
			path:'/movie',
			redirect:'/movie/now'
		}
	]
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    // component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
>>>>>>> 1d30f8a (initial commit)
  },
  {
    path: '/cinema',
    name: 'cinema',
<<<<<<< HEAD
    component: CinemaView
=======
    component: () => import('../views/cinema/index.vue')
>>>>>>> 1d30f8a (initial commit)
  },
  {
    path: '/mine',
    name: 'mine',
<<<<<<< HEAD
    component: MineView
  }
  // {
  //   path: '/about',
  //   name: 'about',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  // }
=======
    component: () => import('../views/mine/index.vue')
  }
>>>>>>> 1d30f8a (initial commit)
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
